package com.example.imtoken.modules.main.wallet.assets

import com.blankj.utilcode.util.ClickUtils
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.example.imtoken.databinding.ItemAssetsViewBinding
import com.example.imtoken.room.schema.WalletAddressSchema

class AssetsAdapter(layoutResId: Int) :
    BaseQuickAdapter<WalletAddressSchema, BaseDataBindingHolder<ItemAssetsViewBinding>>(layoutResId) {


    override fun convert(
        holder: BaseDataBindingHolder<ItemAssetsViewBinding>,
        item: WalletAddressSchema
    ) {
        holder.dataBinding?.item = item
        ClickUtils.applyGlobalDebouncing(holder.itemView) {
            setOnItemClick(it, holder.adapterPosition)
        }
    }

}